package org.tigris.subversion.svnant.commands;

import java.io.File;
import org.tigris.subversion.svnant.SvnAntUtilities;
import org.tigris.subversion.svnclientadapter.ISVNClientAdapter;
import org.tigris.subversion.svnclientadapter.SVNClientException;
import org.tigris.subversion.svnclientadapter.SVNRevision;

public class Update extends ResourceSetSvnCommand
{
  private static final String MSG_CANNOT_UPDATE = "Cannot update file or dir %s";
  private SVNRevision revision = SVNRevision.HEAD;

  public Update()
  {
    super(true, true);
  }

  protected void handleDir(File paramFile, boolean paramBoolean)
  {
    update(paramFile, this.revision, paramBoolean);
  }

  protected void handleFile(File paramFile)
  {
    update(paramFile, this.revision, false);
  }

  private void update(File paramFile, SVNRevision paramSVNRevision, boolean paramBoolean)
  {
    try
    {
      getClient().update(paramFile, paramSVNRevision, paramBoolean);
    }
    catch (SVNClientException localSVNClientException)
    {
      throw ex(localSVNClientException, "Cannot update file or dir %s", new Object[] { paramFile.getAbsolutePath() });
    }
  }

  protected void validateAttributes()
  {
    super.validateAttributes();
    SvnAntUtilities.attrNotNull("revision", this.revision);
  }

  public void setRevision(String paramString)
  {
    this.revision = getRevisionFrom(paramString);
  }

  public void setRecurse(boolean paramBoolean)
  {
    super.setRecurse(paramBoolean);
  }
}

/* Location:           C:\Users\Administrator\Desktop\svnant.jar
 * Qualified Name:     org.tigris.subversion.svnant.commands.Update
 * JD-Core Version:    0.6.0
 */